﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wjtour.Common;
using Hjp.FrameWork.Common;
using Wjtour.BLL;
using System.Linq;

namespace Wjtour.Web.Front
{
    public partial class index : BasePage
    {
        private link_bll _linkbll = new link_bll();
        protected List<Wjtour.Domain.link> links = new List<Domain.link>();

        private Wjtour.BLL.food_bll _bll = new BLL.food_bll();
        private Wjtour.BLL.resturant_bll _hbll = new BLL.resturant_bll();
        private Wjtour.BLL.hotel_bll _hotelBll = new BLL.hotel_bll();
        private Wjtour.BLL.traffic_bll _trafficBll = new BLL.traffic_bll();
        private Wjtour.BLL.line_bll _lineBll = new BLL.line_bll();
        private Wjtour.BLL.travelagency_bll _travelagencyBll = new BLL.travelagency_bll();
        private Wjtour.BLL.goods_bll _goodsBll = new BLL.goods_bll();
        private Wjtour.BLL.shoppingmall_bll _shoppingmallBll = new BLL.shoppingmall_bll();
        private Wjtour.BLL.entainment_bll _entainmentBll = new BLL.entainment_bll();
        private Wjtour.BLL.nongjiale_bll _nongjialeBll = new BLL.nongjiale_bll();
        private Wjtour.BLL.scene_bll _sceneBll = new scene_bll();
        private Wjtour.BLL.article_bll _articleBll = new article_bll();
        private Wjtour.BLL.sitepicture_bll _sitepictureBll = new sitepicture_bll();
        private Wjtour.BLL.media_bll _media_bll = new media_bll();

        protected List<Wjtour.Domain.resturant> resturants = new List<Domain.resturant>();
        protected List<Wjtour.Domain.food> caiyao = new List<Domain.food>();
        protected List<Wjtour.Domain.food> xiaochi = new List<Domain.food>();
        protected List<Wjtour.Domain.hotel> hotels = new List<Domain.hotel>();
        protected List<Wjtour.Domain.traffic> traffics = new List<Domain.traffic>();
        protected List<Wjtour.Domain.line> lines = new List<Domain.line>();
        protected List<Wjtour.Domain.travelagency> travelagencies = new List<Domain.travelagency>();
        protected List<Wjtour.Domain.goods> goods = new List<Domain.goods>();
        protected List<Wjtour.Domain.shoppingmall> shoppingMalls = new List<Domain.shoppingmall>();
        protected List<Wjtour.Domain.entainment> entainments = new List<Domain.entainment>();
        protected List<Wjtour.Domain.nongjiale> nongjiales = new List<Domain.nongjiale>();
        protected List<Wjtour.Domain.scene> scenes = new List<Domain.scene>();
        protected List<Wjtour.Domain.article> essays = new List<Domain.article>();//美文
        protected List<Wjtour.Domain.article> youjis = new List<Domain.article>();//游记
        protected List<Wjtour.Domain.sitepicture> pictures = new List<Domain.sitepicture>();//美图
        slides_bll _slides_bll = new slides_bll();
        protected List<Wjtour.Domain.slides> _slides1 = new List<Domain.slides>();
        protected List<Wjtour.Domain.slides> _slides2 = new List<Domain.slides>();
        protected List<Wjtour.Domain.media> _videos = new List<Domain.media>();


        protected List<Wjtour.Domain.article> _activities = new List<Wjtour.Domain.article>();

        protected void Page_Load(object sender, EventArgs e)
        {
            links = _linkbll.GetAll<Wjtour.Domain.link>("select top 14 * from link order by sort desc").ToList();
            resturants = _hbll.GetList(5);

            caiyao = _bll.GetList(5);

            hotels = _hotelBll.GetList(10);
            traffics = _trafficBll.GetList(9);
            scenes = _sceneBll.GetList(5);
            lines = _lineBll.GetList(5);
            //travelagencies = _travelagencyBll.GetList(6);
            goods = _goodsBll.GetList(5);
            shoppingMalls = _shoppingmallBll.GetList(5);
            entainments = _entainmentBll.GetList(5);
            nongjiales = _nongjialeBll.GetList(5);

            essays = _articleBll.GetAuditTopList("4", 7, null);
            youjis = _articleBll.GetAuditTopListWithFirstLogo("6", 3, 2);
            pictures = _sitepictureBll.GetTopList("1,2,3,4", 4);

            _slides1 = _slides_bll.GetList(1);
            _slides2 = _slides_bll.GetList(2);
            _videos = _media_bll.GetList(null, 3);
            _activities = _articleBll.GetAuditTopListWithLogo("5", 5, null);
        }

    }
}
